package org.webby.url;

import javax.servlet.jsp.tagext.SimpleTagSupport;
import javax.servlet.jsp.JspException;
import java.io.IOException;

public class ObjectUrlTag extends SimpleTagSupport {
  private WebAddressable object;

  public void setObject(WebAddressable object) {
    this.object = object;
  }

  @Override
  public void doTag() throws JspException, IOException {
    getJspContext().getOut().write(object.getPath());
  }
}
